﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using pswb.Classes;
using WeifenLuo.WinFormsUI.Docking;

namespace pswb.Forms.ProcessEdit
{
    public partial class frmProcessStartPage : DockContent
    {
        public event EventHandler onProcessTypeSelected;

        public frmProcessStartPage()
        {
            InitializeComponent();
        }

        private void frmProcessStartPage_Resize(object sender, EventArgs e)
        {
            //center panel
            panel1.Left = this.Width / 2 - panel1.Width / 2;
            panel1.Top = this.Height / 2 - panel1.Height / 2;
        }

        private void frmProcessStartPage_Load(object sender, EventArgs e)
        {
            
        }

        private void btnNew_Click(object sender, EventArgs e)
        {
            StartType type = new StartType();
            type.Mode = StartModes.NEW;
            onProcessTypeSelected(type, new EventArgs());
        }

        private void btnOpen_Click(object sender, EventArgs e)
        {
            StartType type = new StartType();
            type.Mode = StartModes.OPEN;
            onProcessTypeSelected(type, new EventArgs());
        }

        private void btnCopy_Click(object sender, EventArgs e)
        {
            StartType type = new StartType();
            type.Mode = StartModes.COPY;
            onProcessTypeSelected(type, new EventArgs());
        }
    }
}
